package com.kyzh.core.pager.weal.video.viewmodels

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.gushenge.core.beans.Video
import com.gushenge.core.requests.VideoRequest

class VideoBaseViewModel:ViewModel() {

    val beans by lazy {
        MutableLiveData<ArrayList<Video>>().also{
            it.value = arrayListOf()
        }
    }

    var p =1
    var max =1

    fun getData(){
        VideoRequest.getVideoList(p,0){data,p,max_p->
            this.p = p
            this.max = max_p
            beans.value = data
        }
    }

}